package com.zto.sch.aspect;

import com.zto.sch.anno.MyAspectAnno;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Service;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2021-01-08 11:16
 **/
@Service
@Aspect
public class MyAspect {
    @Around("@annotation(myAspectAnno)")
    public void testAround(ProceedingJoinPoint proceedingJoinPoint, MyAspectAnno myAspectAnno) throws Throwable {
        System.out.println("testaround before...");
        proceedingJoinPoint.proceed();
        System.out.println("testaround after...");
    }
}
